<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<link rel="stylesheet" th:href="@{/assets/css/colorbox.css}"/>
<link rel="stylesheet" th:href="@{/assets/css/fixedColumns.dataTables.css}"/>
<link rel="stylesheet" th:href="@{/assets/css/jquery.dataTables.min.css}"/>
<head th:include="fragments/head::header"/>
<style type="text/css">
    .error {
        color: #F00
    }

    .DTFC_LeftBodyLiner {
        height: 910px ! important;
    }
</style>
<body>
<div th:include="fragments/top::top"></div>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <div th:include="fragments/left::left" class="sidebar" id="sidebar"></div>
        <div class="main-content">

            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">定校方案列表</h3>
                                <input type="hidden" name="studentNo" id="studentNo"
                                       th:value="${#httpServletRequest.getParameter('studentNo')}"/>
                                <div class="table-header" style="height: 42px"></div>

                                <div class="table-responsive">
                                    <table id="sample-table-2" class="table table-striped table-bordered table-hover"
                                           style="white-space: nowrap;">
                                        <thead>
                                        <tr>
                                            <th class="hide">id</th>
                                            <th>操作</th>
                                            <th>审核状态</th>
                                            <th>定校单元编号</th>
                                            <th>申请类别</th>
                                            <th>专业教育学段</th>
                                            <th>院校类别</th>
                                            <th>签约/定校国家</th>
                                            <th>院校名称</th>
                                            <th>专业名称</th>
                                            <th>课程/学位名称</th>
                                            <th>课程备注</th>
                                            <th>意向校区</th>
                                            <th>学制</th>
                                            <th>小专业方向</th>
                                            <th>专业链接</th>
                                            <th>申请截止日期</th>
                                            <th>开课时间</th>
                                            <th>是否申请减免学分</th>
                                            <th>申请时间</th>
                                            <th>操作人</th>
                                            <th>合作机构</th>
                                        </tr>
                                        </thead>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>

        <div th:include="fragments/bottom::bottom"></div>
    </div>

    <a href="#" id="btn-scroll-up"
       class="btn-scroll-up btn btn-sm btn-inverse"> <i
            class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>
<!-- /.main-container -->

<!-- Modal备注 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content"></div>
    </div>
</div>
<div th:include="fragments/js::js"></div>

<script th:src="@{/assets/js/jquery.validate.min.js}"></script>
<script th:src="@{/assets/js/jquery.validate.zh-CN.js}"></script>
<!-- page specific plugin scripts -->
<script charset="UTF-8" th:src="@{/assets/js/1.10.15/jquery.dataTables.min.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/jquery.dataTables.bootstrap.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/dataTables.fixedColumns.js}"></script>
<script th:src="@{/assets/js/temp.js}" charset="UTF-8"></script>
<!--<script th:src="@{/business/followService/followService.js}" charset="UTF-8"></script>-->
<!--图片查看器-->
<script th:src="@{/assets/js/jquery.colorbox-min.js}"></script>
<script th:src="@{/layer/layer.js}"></script>
<script type="text/javascript">

    /*<![CDATA[*/
    var currentUser = $("#currentUser").val();
    var oTable1;
    jQuery(function ($) {
        oTable1 = $('#sample-table-2').dataTable({
            "aLengthMenu": [10,20],  //用户可自选每页展示数量 5条或10条
            "scrollX": true,
            "scrollCollapse": true,
            "bProcessing": true,//显示搜索样式
            "bDeferRender": true,//延迟加载表格
            "fixedColumns": { //固定列的配置项
                "leftColumns": 1, //固定左边第一列
            },
            "bFilter": false,//是否使用搜索
            "bProcessing": true,
            "sPaginationType": "bs_normal",//分页样式
            "bRetrieve": true,//是否调用后台
            "bServerSide": true,//是否以后台分页
            "bAutoWidth": true,
            "sAjaxSource": "/planCollege/planList/data",//请求路径
            "fnServerData": function (sSource, aoData, fnCallback) {
                aoData.push(
                    {"name": "studentNo", "value": $("#studentNo").val()}
                )
                $.ajax({
                    "dataType": 'json',
                    "type": "POST",
                    "url": sSource,
                    "data": aoData,
                    "success": fnCallback
                });
            },
            "aaSorting": [[0, "desc"]],
            "bSort": true,
            "aoColumns": [
                {"sClass": "center", "bVisible": false, "mData": "id"},//此列不显示
                {"sClass": "center", "bSortable": false, "mData": function(data){
                    return "";
                }},
                {"sClass": "center", "bSortable": false, "mData": function(data){
                    if (data.auditStatus == 0){ return "经理未审核";
                    } else if (data.auditStatus == 2){ return "经理已驳回";
                    } else if (data.auditStatus == 3){ return "文签已接受";
                    } else if (data.auditStatus == 4){ return "已驳回";
                    } else if (data.auditStatus == 6){
                        if (data.studentConfirmStatus == 1){
                            return "学生未确认";
                        } else if (data.studentConfirmStatus == 2) {
                            return "学生已确认";
                        }
                    } else if (data.auditStatus == 1){
                        if(data.studentConfirmStatus == 1){
                            return "学生未确认";
                        } else if (data.studentConfirmStatus == 2){
                            return "学生已确认";
                        }
                    }
                    return "";
                }},
                {"sClass": "center", "bSortable": false, "mData": "id"},
                {"sClass": "center", "bSortable": false, "mData": function (data) {
                    if (data.applyType == 0) { return "直录" }
                    if (data.applyType == 1) { return "双录" }
                    if (data.applyType == 2) { return "纯语言" }
                    return "";
                }},
                {"sClass": "center", "bSortable": false, "mData": "educationLevelName"},
                {"sClass": "center", "bSortable": false, "mData": function (data) {
                    if (data.collegeType == 1) { return "语言" }
                    if (data.collegeType == 2) { return "预备" }
                    if (data.collegeType == 3) { return "主课" }
                    return "";
                }},
                {"sClass": "center", "bSortable": false, "mData": function(data){
                    var nation = data.nationName == null ? "" : data.nationName;
                    var country = data.collegeCountryName == null ? "" : data.collegeCountryName;
                    return nation + "/" + country;
                }},
                {"sClass": "center", "bSortable": false, "mData": "collegeName"},
                {"sClass": "center", "bSortable": false, "mData": "majorName"},
                {"sClass": "center", "bSortable": false, "mData": "courseName"},
                {"sClass": "center", "bSortable": false, "mData": "courseRemarkName"},
                {"sClass": "center", "bSortable": false, "mData": "schoolArea"},
                {"sClass": "center", "bSortable": false, "mData": "schoolLength"},
                {"sClass": "center", "bSortable": false, "mData": "majorDetail"},
                {"sClass": "center", "bSortable": false, "mData": "majorUrl"},
                {"sClass": "center", "bSortable": false, "mData": "applyDeadline"},
                {"sClass": "center", "bSortable": false, "mData": "courseStartTime"},
                {"sClass": "center", "bSortable": false, "mData": "reduceCreditStatus"},
                {"sClass": "center", "bSortable": false, "mData": "createTime"},
                {"sClass": "center", "bSortable": false, "mData": "operatorName"},
                {"sClass": "center", "bSortable": false, "mData": "agencyName"}
            ],
            "oLanguage": {
                "sLengthMenu": "每页 _MENU_条 ",
                "sZeroRecords": "对不起，查询不到任何相关数据",
                "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录 ",
                "sInfoEmpty": "显示 0 到 0 条，共 0 条记录",
                "sInfoFiltered": "数据表中共为 _MAX_ 条记录)",
                "sProcessing": "正在加载中...",
                "sSearch": "搜索",
                "sUrl": "", //多语言配置文件，可将oLanguage的设置放在一个txt文件中，例：Javascript/datatable/dtCH.txt
                "oPaginate": {
                    "sFirst": "第一页",
                    "sPrevious": " 上一页 ",
                    "sNext": " 下一页 ",
                    "sLast": " 最后一页 "
                }
            }
            //多语言配置

        });

        $("#query").click(function () {
            oTable1.fnDraw();
        });
    })


    //定校信息
    function toPlanCollegeURL(studentNo, planId, id) {
        var planCollegeInfoUrl = $("#planCollegeInfoUrl").val();
        window.open(planCollegeInfoUrl + '?code=edit&collegeId='+id+'&memberid='+currentUser+'&sid='+studentNo);
    }
    /*]]>*/

</script>
</body>
</html>
